<?php

namespace app\admin\controller;

use think\Db;
use think\Session;
use think\Request;

class Index
{
    public function index()
    {
        //遍历右下角的文章部分
        $data = Db::name('article')
            ->order('id desc')
            ->paginate(10);
        $a = [];
        foreach ($data as $v) {
            $b = date('Y-m-d', $v['time']);
            $c = array_push($v, $b);
            $a[] = $v;
        }




        return view('', [
            'data' => $a
        ]);

    }

    public function error()
    {
        return view();
    }
}
